public class 求全年营业额 {
    public static void main(String[] args) {
        /*
        //赋值调用
        int sum = getSum(10,20,30);
        System.out.println(sum);
        //输出调用
        System.out.println(getSum(10,20,30));
        */
        //计算第一季度的营业额
        int sum1 = getSum(10, 20, 30);
        //计算第二季度的营业额
        int sum2 = getSum(20, 30, 40);
        //计算第三季度的营业额
        int sum3 = getSum(30, 40, 50);
        //计算第四季度的营业额
        int sum4 = getSum(50, 50, 60);
        //求全年的总营业额
        int sum = sum1 + sum2 + sum3 + sum4;
        System.out.println(sum);
    }

    public static int getSum(int num1, int num2, int num3) {
        int result = num1 + num2 + num3;
        return result;
    }
}
